//
//  ResetPWDViewController.m
//  meiyaya
//
//  Created by 张领瑞 on 2017/8/31.
//  Copyright © 2017年 ShiFeiEr. All rights reserved.
//

#import "ResetPWDViewController.h"
#import "PrefixHeader.pch"

@interface ResetPWDViewController ()
@property (weak, nonatomic) IBOutlet UITextField *passwordTF;

@property (weak, nonatomic) IBOutlet UITextField *confirmPasswordTF;
@end

@implementation ResetPWDViewController







#pragma mark 完成重新设置密码
- (IBAction)commitResetPassword:(id)sender {
    
    if ((_passwordTF.text.length > 6 && _passwordTF.text.length < 16)&& [_passwordTF.text isEqualToString:_confirmPasswordTF.text]) {
        
        
        
        
        
        //设置密码成功后跳转页面
        LoginViewController *vc = (LoginViewController*)[self viewControllerInMStoryboardWithName:@"Main" WithIdentifier:@"LoginViewController"];
        vc.phoneNumTF.text = self.phoneNumber;
        [self presentViewController:vc animated:YES completion:nil];
        
    }else{
        [self presentDefaultAlertViewWithMessage:@"请确认您输入的密码长度在6-16位，并且与确认密码相同!"];
    }
    

    
    
    
    
    
    
    
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self addTapGestureForViewControllerToRecoverKeyboard];//添加手势回收键盘
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
